package com.example.wifi_scan;


import java.util.ArrayList;
import java.util.List;

public class resource {
    public static StringBuffer stringBuffer = new StringBuffer();

    public static final String[] maclist = {"6c:b7:49:55:81:85", "70:f9:6d:2b:80:20", "70:f9:6d:2b:80:30"};

    //输出固定格式的字符串，方便显示
    public static String arraytostring(List<String> list) {
        Object[] tempstring = list.toArray();
        StringBuilder stb = new StringBuilder();
        for (Object s : tempstring) {
            stb.append((String) s + "\n");
        }
        return stb.toString();
    }

    //将数组中的数据打包为固定的格式，方便传递
    public static String dataForIntent(ArrayList<String> stringArrayList) {
        StringBuilder stringBuilder = new StringBuilder();
        for (String s : stringArrayList) {
            stringBuilder.append(s+" ");
        }
        return stringBuilder.toString();
    }

    //解析数据为数组，方便使用
    public static String[] getData(String data){
       String[] str = data.split(" ");
       return  str;
    }
}
